package com.hopu.v1.service.front.question.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hopu.v1.mapper.front.question.QuestionsCommentsMapper;
import com.hopu.v1.pojo.question.QuestionsComments;
import com.hopu.v1.service.front.question.QuestionsCommentsService;
import com.hopu.v1.vo.CommentVo;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author admin
 * @description 针对表【t_questions_comments(题目评论表)】的数据库操作Service实现
 * @createDate 2024-10-09 15:28:33
 */
@Service
public class QuestionsCommentsServiceImpl extends ServiceImpl<QuestionsCommentsMapper, QuestionsComments>
        implements QuestionsCommentsService {
    @Resource
    private QuestionsCommentsMapper questionsCommentsMapper;

    @Override
    public IPage<CommentVo> getQuestionCommentByStudentId(Page<QuestionsComments> page, String studentId) {

        return questionsCommentsMapper.getQuestionCommentByStudentId(page,studentId);
    }

    @Override
    public List<CommentVo> getCommentContentByQuestionId(String studentId,String questionId) {
        return questionsCommentsMapper.getCommentContentByQuestionId(studentId,questionId);
    }
}




